﻿using MongoDB.Bson.Serialization.Attributes;
using Newtonsoft.Json;

namespace HDS.Model.MongoDb
{

    public class BaseObject<T>
    {
        [BsonElement("_id")]
        [BsonId]
        public T Id { get; set; }

        public string ToJson()
        {
            return JsonConvert.SerializeObject(this);
        }
    }
}
